from laadsOrderTool.ui.ui_inputOrderUrl import Ui_inputUrlDialog
from PySide6.QtWidgets import QDialog
from PySide6.QtCore import QSettings


class InputOrderUrl(QDialog):
    """点击新建订单按钮，显示输入订单链接对话框"""

    def __init__(self):
        super(InputOrderUrl, self).__init__()
        self.ui = Ui_inputUrlDialog()
        self.ui.setupUi(self)
        self.init_face()

    def init_face(self):
        self.ui.groupBox.setDisabled(True)
        settings = QSettings('laadsOrderTool', 'laadsOrderTool')
        self.ui.lineEdit_username.setText(settings.value('username'))
        self.ui.lineEdit_password.setText(settings.value('password'))
